﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iTunesLib;


namespace MusicForMyBlog.App_Code
{
    class Itunes
    {
        static bool itunesStatus;
        iTunesApp iApp;

        public Itunes()
        {
            
            
        }


        protected void iApp_OnPlayerPlayEvent(object iTrack)
        {
            TrayApp ta = new TrayApp();
            ta.CurrentSong = iApp.CurrentTrack.Name;
        }

        public void Start()
        {
            iApp = new iTunesApp();
            iApp.OnPlayerPlayEvent += new _IiTunesEvents_OnPlayerPlayEventEventHandler(iApp_OnPlayerPlayEvent);
        }

    }
}
